package com.skymobi.icar;

import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Point;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
public class MyLocationOverlay extends Overlay {
    GeoPoint myPoint;
   
    public void setPoint(GeoPoint mypoint){
        this.myPoint=mypoint;
    }
   
    @Override
    public boolean draw(Canvas canvas, MapView mapView, boolean shadow,long when){
         super.draw(canvas, mapView, shadow,when);
         Paint paint = new Paint();
         Point myScreenCoords = new Point();
         mapView.getProjection().toPixels(myPoint, myScreenCoords);
         paint.setARGB(255, 255, 0, 0);
         //paint.setStyle(Paint.Style.FILL_AND_STROKE);
         canvas.drawCircle( myScreenCoords.x, myScreenCoords.y,6, paint);
         return(true);
    }
}
